using System.Data;
using ET;
namespace DA
{
	public class Currency_DAL
	{
	private clsConnect cls = new clsConnect();

	#region Getdata
	public DataTable BindGirdtb_Currency(string keywords)
	{
	return cls.Search("sp_tb_Currency_Search", "@KeyWords", keywords);
	}
    //public DataTable BindGirdtb_CurrencyDetail(int id)
    //{
    //}
	#endregion

	#region Insert
	public bool Inserttb_Currency(Currency_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Currency_Alias", data.Currency_Alias);
	cls.AddParameter("@Currency_Name", data.Currency_Name);
	cls.AddParameter("@Currency_User_Add", data.Currency_User_Add);
	cls.AddParameter("@Currency_Date_Add", data.Currency_Date_Add);
	cls.AddParameter("@Currency_Computer_Add", data.Currency_Computer_Add);
	cls.AddParameter("@Currency_User_Modify", data.Currency_User_Modify);
	cls.AddParameter("@Currency_Date_Modify", data.Currency_Date_Modify);
	cls.AddParameter("@Currency_Computer_Modify", data.Currency_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Currency_Insert");
	return true;
	}
	#endregion

	#region Update
	public bool Updatetb_Currency(Currency_ET data)
	{
	cls.CreateNewSqlCommand();
	cls.AddParameter("@Currency_ID", data.Currency_ID);
	cls.AddParameter("@Currency_Alias", data.Currency_Alias);
	cls.AddParameter("@Currency_Name", data.Currency_Name);
	cls.AddParameter("@Currency_User_Modify", data.Currency_User_Modify);
	cls.AddParameter("@Currency_Date_Modify", data.Currency_Date_Modify);
	cls.AddParameter("@Currency_Computer_Modify", data.Currency_Computer_Modify);
	cls.ExecuteNonQuery("sp_tb_Currency_Update");
	return true;
	}
	#endregion

	#region Delete
	public bool Deletetb_Currency(int id)
	{
        cls.Delete("sp_tb_Currency_Delete", "@Currency_ID", id);
	return true;
	}
	#endregion
	}
}